<?php
/* @var $this PictureController */
/* @var $model Picture */

$this->breadcrumbs=array(
	'Pictures'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List Picture', 'url'=>array('index')),
	array('label'=>'Manage Picture', 'url'=>array('admin')),
);
?>

<h1>Create Picture</h1>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'picture-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
        	'enctype' => 'multipart/form-data',
    ),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<!--div class="row">
		<?php /* echo $form->labelEx($model,'url'); ?>
		<?php echo $form->textArea($model,'url',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'url'); */ ?>
	</div-->
	<div class="row">
		<?php echo '<b>Choose image/s</b>'; ?>
		<?php
		  $this->widget('CMultiFileUpload', array(
		     'model'=>$model,
		     'name'=>'url',
		     'attribute'=>'url',
		     'accept'=>'jpg|gif|png',
		     /*'options'=>array(
			'onFileSelect'=>'function(e, v, m){ alert("onFileSelect - "+v) }',
			'afterFileSelect'=>'function(e, v, m){ alert("afterFileSelect - "+v) }',
			'onFileAppend'=>'function(e, v, m){ alert("onFileAppend - "+v) }',
			'afterFileAppend'=>'function(e, v, m){ alert("afterFileAppend - "+v) }',
			'onFileRemove'=>'function(e, v, m){ alert("onFileRemove - "+v) }',
			'afterFileRemove'=>'function(e, v, m){ alert("afterFileRemove - "+v) }',
		     ),*/
		  ));
		?>
		<?php echo $form->error($model,'url'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'description'); ?>
	</div>

	

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div>